﻿using System.Runtime.Serialization;
using Microsoft.Practices.Prism.ViewModel;

namespace FU.Capstones.IMS.Web.Common.InventoryServiceProxy.Respondents
{
    [DataContract(Namespace=WebConstants.ServiceNamespace, Name="Feedback")]
    [KnownTypeAttribute(typeof(SingleFeedback<>))]
    [KnownTypeAttribute(typeof(CollectionFeedback<>))]
    public class Feedback : NotificationObject
    {
        private bool isSuccessful;
        private string message;

        [DataMember]
        public string Message
        {
            get { return message; }
            set
            {
                if (!ReferenceEquals(value, message))
                {
                    message = value;
                    RaisePropertyChanged(() => Message);
                }
            }
        }

        [DataMember]
        public bool IsSuccessful
        {
            get { return isSuccessful; }
            set
            {
                if (!isSuccessful.Equals(value))
                {
                    isSuccessful = value;
                    RaisePropertyChanged(() => IsSuccessful);
                }
            }
        }

    }
}